// Created by YE on 2024/2/13.
//

#ifndef MATINTERPRETER_YCH_H
#define MATINTERPRETER_YCH_H

#include "limits.h"
#include "stdlib.h"
#include "stdio.h"
#include "math.h"
#include "string.h"
#include "ych_exception.h"
#include "ych_string.h"
#include "ych_mat.h"

#define True 1
#define False 0
#define YCH_UINT unsigned int
#if defined(LLONG_MAX)
#define YCH_INT long long
#define YCH_FLOAT double
#else
#define YCH_INT int
#define YCH_FLOAT float
#endif
#define YCH_BOOL int
#define YCH_MAT YMat
#define YCH_STRING YString

#define YCH_STATE YCH_UINT
#define YCH_ERROR_STATE YCH_UINT

#define YCH_NO 0
#define YCH_OK 1

#define YCH_VM_INSTRUCTION_SIZE (1024*4)
#define YCH_VM_FUNC_OFFSET (1024*2)

#define YCH_VM_REGISTER_SIZE 8
#define YCH_VM_STACK_SIZE (1024*4)
#define YCH_VM_MEM_SIZE 1024

#define YCH_VM_INT_CONST_SIZE 1024
#define YCH_VM_FLOAT_CONST_SIZE 1024
#define YCH_VM_STRING_CONST_SIZE 128
#define YCH_VM_CFUNC_SIZE 32

#endif //MATINTERPRETER_YCH_H

